package com.hui.qiniucloud.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.DecimalMax;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;

/**
 * 文生图请求DTO
 */
@Data
@Schema(description = "文生图请求")
public class ImageGenerateRequest {

    @Schema(description = "描述要生成图像的文本提示", example = "鱼眼镜头，一只猫咪的头部，画面呈现出猫咪的五官因为拍摄方式扭曲的效果。", required = true)
    @NotBlank(message = "提示词不能为空")
    @Size(max = 1000, message = "提示词长度不能超过1000个字符")
    private String prompt;

    @Schema(description = "图像尺寸", example = "1024x1024", allowableValues = {"512x512", "1024x1024", "1024x1536", "1536x1024"})
    private String size = "1024x1024";

    @Schema(description = "随机种子，用于生成可重现的图像", example = "12")
    private Integer seed;

    @Schema(description = "引导尺度，控制生成图像与提示的匹配程度", example = "2.5", minimum = "1.0", maximum = "10.0")
    @DecimalMin(value = "1.0", message = "引导尺度最小值为1.0")
    @DecimalMax(value = "10.0", message = "引导尺度最大值为10.0")
    private Double guidanceScale = 2.5;

    @Schema(description = "是否添加水印", example = "true")
    private Boolean watermark = true;

    @Schema(description = "返回格式", example = "url", allowableValues = {"url", "b64_json"})
    private String responseFormat = "url";

    @Schema(description = "模型名称", example = "doubao-seedream-3-0-t2i-250415")
    private String model = "doubao-seedream-3-0-t2i-250415";
}